Skip to content

Conversation

@constantinpape
Copy link
Contributor

No description provided.

@constantinpape
Copy link
Contributor Author

This updates the measurement functionality in order to compute the background subtracted median intensity that we need for the GFP / ChReef evaluation.

In order to run this with correct settings, you need to run it as follows:

from flamingo_tools.measurements import compute_object_measures, compute_sgn_background_mask

image_path = ...  # the PV data
seg_path = ...  # the sgn segmentation

# need to add image_key, segmentation_key for zarr data for both functions
# 'compute_sgn_background_mask' does not yet support accessing data from s3, but that should be easy to add
mask = compute_sgn_background_mask(image_path, seg_path)  
compute_object_measures(
  image_path, seg_path,
  segmentation_table_path=...,
  output_table_path=..., 
  background_mask=mask,
  feature_set="default_background_subtract",
  dilation=4,
  median_only=True,
)

@constantinpape
Copy link
Contributor Author

I will go ahead and merge this.

@constantinpape constantinpape merged commit 1836e50 into master Aug 3, 2025
6 checks passed
@constantinpape constantinpape deleted the measurement-updates branch August 3, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants